﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using App1AppHandler;

namespace Reborn_Server.App1AppHandler
{
    public class Spell_FlameShield : Buff
    {

        public Spell_FlameShield()
        {
            minutesLeft = 10;
        }

        public override bool castWhileAlone(SpellIcon sIcon)
        {
            return true;
        }

        public override void Resume(CreatureBase targetCreatureBase, SpellIcon _spellIcon, int timeRemaining, int castLevel, int castCharacterID, int castInt, int castWis, int optionalValue, string xmlData)
        {
            base.Resume(targetCreatureBase, _spellIcon, timeRemaining, castLevel, castCharacterID, castInt, castWis, optionalValue, xmlData);

            minutesLeft = timeRemaining;
            spellTimer.Start();
        }

        public void Cast(CreatureBase myCreatureBase, int CastLevel, long CreatureGUID)
        {
            List<MapItem> MapItemsWithin12;
            if (base.InitializeCast(myCreatureBase, CastLevel, CreatureGUID, true, out MapItemsWithin12) == false)
                return;

            TargetCreatureBase.buffManager.UpdateBuffs();
            myCreatureBase.Update_Character();

            //Start Spell Timer
            spellTimer.Start();
        }
        public int GetDamage()
        {
            int damage = SkillManager.AdjustForCombat(System.Convert.ToInt32(base.CastingCreatureLevel / 1.5), 0, base.CastingCreatureInt / 2);
            return damage;
        }
    }
}
